﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="Tags.aspx.vb" Inherits="HatHotels.Tags" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table width="100%">
        <tr>
            <td align="center">
             Tag List :
                <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource2">
                    <ItemTemplate>
                        <a href="Tags.aspx?Tag=<%# Eval("Tag")%> ">
                            <%# Eval("Tag")%></a>
                    </ItemTemplate>
                    <SeparatorTemplate>
                        |
                    </SeparatorTemplate>
                </asp:Repeater>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:HatConnStr %>"
                    ProviderName="<%$ ConnectionStrings:HatConnStr.ProviderName %>" 
                    SelectCommand="SELECT [ID], [Tag] FROM [Tags]">
                </asp:SqlDataSource>
                <br />
                <br />
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="SqlDataSource1" CellPadding="4" ForeColor="#333333" 
                    GridLines="None" Width="908px">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:HyperLinkField DataNavigateUrlFields="HotelUrl" 
                    DataNavigateUrlFormatString="{0}" DataTextField="HotelName" 
                    HeaderText="Hotel Name" >
              
                </asp:HyperLinkField>
                        <asp:BoundField DataField="Location" HeaderText="Location" 
                            SortExpression="Location" />
                        <asp:BoundField DataField="ContactDetails" HeaderText="ContactDetails" 
                            SortExpression="ContactDetails" />

                         <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="~/Details.aspx?ID={0}" DataTextField="Picture" 
                    
                    DataTextFormatString="&lt;img src=&quot;image/{0}&quot; class=&quot;Thumbnail&quot; &gt;" 
                    HeaderText="photo" InsertVisible="False" ShowHeader="False" >
                <ControlStyle BorderStyle="None" />
               
                </asp:HyperLinkField>


                        <asp:BoundField DataField="PostCode" HeaderText="PostCode" 
                            SortExpression="PostCode" />
                    </Columns>
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HatConnStr %>" 
                    ProviderName="<%$ ConnectionStrings:HatConnStr.ProviderName %>" 
                    SelectCommand="SELECT DISTINCT [HotelName], [Location], [Stars], [Description], [ContactDetails], [Picture], [HotelUrl], [PostCode], [ID], [Tag] FROM [Tagsview] WHERE ([Tag] = ?)">
                    <SelectParameters>
                        <asp:QueryStringParameter Name="Tag" QueryStringField="Tag" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <br />
                <br />
            </td>
        </tr>
    </table>
</asp:Content>
